/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.inria.openmath.omapi;

/**
 *
 * @author Mr.Sam
 */

import java.io.*;
import java.util.Locale;


/**
 * Extends the basic Printer interface to use Streams as output.
 *
 * <p>All OpenMath StreamPrinters must implement this basic interface: it allows
 * applications to output OpenMath objects on character streams.</p>
 *
 */
public interface StreamPrinter extends Printer {

    /**
     * Allows an application to set the output destination.
     *
     * <p>Sets the output destination for all put*() methods is.
     * The output stream may be changed during print.
     * But, this is legal only between two OpenMath object output.
     * Or else a OMException is thrown .
     * and current output stream is not changed.
     *
     * @param output the new output destination
     *
     * @exception fr.inria.openmath.omapi.OMException Any OpenMath exception
     */
    public void setOutput(OutputStream output) throws OMException ;

    /**
     * Allows an application to get the current output destination.
     *
     * <p>Gets the current output destination.
     * @return the cureent output destination (or NULL if none is set)
     */
    public OutputStream getOutput() ;

}
